﻿using System;
using System.Windows;

namespace TrackIT
{
    /// <summary>
    /// Interaction logic for MantisCredentials.xaml
    /// </summary>
    public partial class MantisCredentials : Window
    {
        public MantisCredentials()
        {
            InitializeComponent();
        }

        public string Password
        {
            get
            {
                return passwordBox1.Password;
            }
        }

        public string Username
        {
            get
            {
                return usernameBox.Text;
            }
        }

        private void MantisCredentialsOK(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
            Close();
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
            Close();
        }

        private void Window_Activated(object sender, EventArgs e)
        {
            passwordBox1.Clear();
            usernameBox.Text = Environment.UserName;
            passwordBox1.Focus();
        }
    }
}
